<!--
 * @company : 版权所属 四川北星惯牌科技有限公司
 * @contact : 刘经理 19326416371
 -->
<template>
	<view class="content-box w100">
		<view class="head-box" :style="{paddingTop: +statusBarHeight+'px'}">
			<image src="@/static/login/login_bg.png" class="head-bg" mode="widthFix"></image>
			<view class="head-title flex-center">
				<text class="title">注册</text>
			</view>
		</view>
		<!-- 注册表单 -->
		<view class="" style="flex: 1;">
			<registerFromVue :inviteInfo="inviteInfo"></registerFromVue>
		</view>
	</view>
</template>

<script setup>
	import registerFromVue from '../../components/login/registerFrom.vue';
	import {
		parseURLParams3
	} from '@/utils/utools.js';
	const statusBarHeight = ref(0);
	const inviteInfo = reactive({
		code: '',
		type: 0
	});
	onLoad(async (option) => {
		console.log('register分享参数', option);
		statusBarHeight.value = uni.getSystemInfoSync().statusBarHeight;
		if (option.i) { //注册码
			inviteInfo.code = option.i;
		}
		if (option.t) { //类型
			inviteInfo.type = option.t;
		}
		if (option.scene) { //小程序码分享
			let url = '?' + decodeURIComponent(option.scene);
			let parameter = parseURLParams3(url);
			inviteInfo.code = parameter.i;
			inviteInfo.type = parameter.t;
		}

	})
</script>

<style lang="scss" scoped>
	.content-box {
		width: 100%;
		height: 100vh;
		overflow: hidden;
		display: flex;
		flex-direction: column;
	}

	.head-box {
		width: 100%;
		position: relative;
		box-sizing: border-box;

		.head-bg {
			position: absolute;
			z-index: -1;
			top: 0;
			left: 0;
			width: 100%;
		}

	}

	.head-title {
		height: 76rpx;
		box-sizing: border-box;

		.title {
			font-weight: bold;
			font-size: 34rpx;
			color: rgba(255, 255, 255, 0.87);
		}
	}
</style>